define(function (require) {
var zsApp= require('app');  
//require('selectCache');
zsApp.controller( 'goodsController',["$scope","$http","$state","$stateParams","$window","$timeout", "$rootScope",function($scope,$http,$state,$stateParams,$window,$timeout,$rootScope){
		
		$scope.goodsdates = [];
		$scope.goodsdates.push(
		{
			goodsName:"商品A",
			goodsSum:10,
			shelfTime:'2017/09/07',
			browser:10000,
			salesVolume:9090,
			price:98,
			status:'审核通过',
			strategy:'一捆'
  		},
  		{
			goodsName:"商品B",
			goodsSum:100,
			goodsType:90,
			shelfTime:'2017/09/07',
			browser:100,
			salesVolume:1900,
			price:998,
			status:'未审核',
			strategy:'单买'
  		},
  		{
			goodsName:"商品c",
			goodsSum:150,
			goodsType:80,
			shelfTime:'2017/09/07',
			browser:1000,
			salesVolume:3900,
			price:99899,
			status:'审核通过',
			strategy:'分批'
  		}
  		);
  		
  		
  		$scope.goodstr =false;
  		$scope.trhide = false;
  		$scope.goodstropen = function(event,$index){	
			var self = this;
			$scope.indexs = self.$index;
			$(".act").click(function(){})
//			if($scope.indexs = $index){
//				$scope.trhide = true;
//			}
//			if(self){
//				$scope.goodstr[$scope.indexs] =!$scope.goodstr[$scope.indexs];
//			}
			
//			if($($event.target.index)){
//				$scope.goodstr= true;	
//			}
//			angular.forEach($scope.goodsdates,function(goodsdates,index){
//	            if(self.$index==index){
//	               $scope.goodstr= true;
//	        	}
//	            
//    		})
//			
			console.log($scope.indexs);
			console.log($index);
//			
//			console.log($(event.target).html());	
		}
  		
  	$scope.goodspanel = false;	
  	$scope.goodspanels = function(){
  		$scope.goodspanel = !$scope.goodspanel;
  	}
	
}]);
});